#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "ts.h"
#include "hires.h"
#include "sockets.h"
#include "netopt.h"
#include <unistd.h>

char http[4096];

int main(int ac,char** av){
	struct netopt* op = netopt(ac,av);
	int sock, result, len, answer_len;
	double start,end;
	char* answer_ptr;
	char headers[4096];
	if(op == 0){
		return 1;
	}
	if(0 == *op->addr){
		printf("need addr\n");
		return 1;
	}
	if(0 == op->port){
		printf("need port\n");
		return 1;
	}
	sock = make_connect(op->addr,op->port,op->laddr,op->lport);
	if(!sock){
		return 1;
	}
	printf("ok\n");
	sleep(3600);
	close_connect(sock);
	return 0;
}
